package com.norman.sorry.core.tiles;

/**
 * Represents a tile factory. This interface requires a few basic methods that
 * are critical to the game.
 * 
 * @param <E>
 *           the type of tile this factory produces.
 * 
 * @author Brian Norman
 * @version 0.0.1 beta
 * @since 0.0.1 beta
 */
public interface ITileFactory<E extends ITile> {

   /**
    * Creates a new default tile.
    * 
    * @return a new default tile.
    */
   public E createTile();

   /**
    * Creates a new safe tile. This tile can be used to create a safe zone for
    * game pieces.
    * 
    * @return a new safe tile.
    */
   public E createSafeTile();

   /**
    * Creates a new start tile. This tile can be used as a starting point for a
    * specific color of game pieces.
    * 
    * @return a new start tile.
    */
   public E createStart();

   /**
    * Creates a new home tile. This tile can be used as the final home tile for
    * a specific color of game pieces.
    * 
    * @return a new home tile.
    */
   public E createHome();

   /**
    * Creates a new linked tile with the given properties.
    * 
    * @param start
    *           whether this tile is a starting tile.
    * @param safe
    *           whether this tile is part of a safe zone.
    * @param home
    *           whether this tile is a home tile.
    * @return a new linked tile.
    * @see com.norman.sorry.core.tiles.AbstractLinkedTile#AbstractLinkedTile(boolean,
    *      boolean, boolean)
    */
   public E create(boolean start, boolean safe, boolean home);

}
